﻿using AbstractFactoryPattern.Abstractions;
using AbstractFactoryPattern.Ingredients;
using System;
using System.Collections.Generic;
using System.Text;

namespace AbstractFactoryPattern.ConcreteProducts
{
    public class LIuzhouPizza : Pizza
    {
        private readonly IPizzaIngredientFactory _pizzaIngredientFactory;

        public LIuzhouPizza(IPizzaIngredientFactory pizzaIngredientFactory)
        {
            _pizzaIngredientFactory = pizzaIngredientFactory;
        }
        public override void Prepare()
        {
            //throw new NotImplementedException();
            Console.WriteLine($"准备：{Name}");
            Dough = _pizzaIngredientFactory.CreateDough();
            Sauce = _pizzaIngredientFactory.CreateSauce();
            Clams = _pizzaIngredientFactory.CreateClams();
            Console.WriteLine($"  {Dough.Name}");
            Console.WriteLine($"  {Sauce.Name}");
            Console.WriteLine($"  {Clams.Name}");
        }
    }
}
